const localeKey = 'e9_locale';
let langId = 7;

try {
  langId = (window.localStorage && window.localStorage.login) ? (JSON.parse(window.localStorage.login) ? JSON.parse(window.localStorage.login).langId : 7) : 7;
} catch (e) {}

const language = langId || (window[localeKey] && window[localeKey].userLanguage) || 7;
if (language == 7) {
  window.meetingCalendarI18n = $.extend({}, window.meetingCalendarI18n || {}, {
    moment: {
      dateformat: {
        fulldayshow: 'YYYY年MM月DD日',
        fulldayvalue: 'YYYY-MM-DD',
        Md: 'MM月DD日',
        Md3: 'MM月DD日 (ddd)',
        Md4: 'MM月DD日 (d)',
        yM: 'YYYY年MM月',
        yMd: 'YYYY年MM月DD日',
        y4w2: 'YYYY年ww周',
      },
    },
    langId: language,
  });
} else if (language == 9) {
  window.meetingCalendarI18n = $.extend({}, window.meetingCalendarI18n || {}, {
    moment: {
      dateformat: {
        fulldayshow: 'YYYY年MM月DD日',
        fulldayvalue: 'YYYY-MM-DD',
        Md: 'MM月DD日',
        Md3: 'MM月DD日 (ddd)',
        Md4: 'MM月DD日 (dddd)',
        yM: 'YYYY年MM月',
        yMd: 'YYYY年MM月DD日',
        y4w2: 'YYYY年ww周',
      },
    },
    langId: language,
  });
} else {
  window.meetingCalendarI18n = $.extend({}, window.meetingCalendarI18n || {}, {
    moment: {
      dateformat: {
        fulldayshow: 'MMM DD YYYY',
        fulldayvalue: 'YYYY-MM-DD',
        Md: 'MMM DD',
        Md3: 'MMM DD (ddd)',
        Md4: 'MMM DD (dddd)',
        yM: 'MMM YYYY',
        yMd: 'MMM DD YYYY',
        y4w2: 'YYYY-[W]WW',
      },
    },
    langId: language,
  });
}

